feat(budget): conserve and retain named resource usage - #1156
Merged
Conversation
drewstone
marked this pull request as ready for review
September 9, 2026 21:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caller-defined GPU time, storage, and service quotas previously bypassed Runtime's conserved budget pool.
This change carries named resource limits and measured receipts through the existing pool, supervisor, Router transport, and durable records.
Names and units belong to the caller; amounts use non-negative safe integers, such as GPU milliseconds or storage bytes.
Reservations are atomic, known unused capacity is refunded, and overruns remain recorded.
Missing, conflicting, interrupted, retried, or overflowing measurements preserve their available subtotal and close further admission.
usage.resourcesextends the existing Router response contract, so a caller can instrument the production transport without replacing the supervisor or its profile.Validation covers concurrent children with two dimensions, 100-child refunds and journal replay, integer overflow, preflight refusal, cancellation, nested recovery, and buffered/SSE Router receipts.
The change also retains two bounded live Sandbox terminal records: exact output replay, detach/reconnect, acknowledged process stop, and verified sandbox deletion, with zero model prompts.
Those terminal records establish partial Sandbox conformance; local Bridge attachment and the other untested #773 conditions remain open.
The release pairs Runtime 0.209.0 and Bench 0.11.3 with Eval 0.180.0 and Knowledge 15.0.3.
Eval reports retain source-attributed resource receipts without summing parent-inclusive and child totals.
SWE-bench now stages repositories inside the writable session workspace.
Setup, worker instructions, and patch extraction share that path.
A live sandbox check cloned SymPy 11618, extracted a source edit, and captured zero model events.
That calibration case stays outside the Lab experiment.
Strict dependency resolution and an explicit peer check after frozen CI installs reject incompatible package sets before builds.
The previously incompatible cohort reproduces both the frozen-install gap and the peer-check refusal.
Local checks pass for source/examples and Bench public types, generated docs/API freshness, package metadata, and focused resource/recovery tests with Eval 0.180.0.
The final packed cohort and official optimizer checks run against exact dependency release commits in CI.
Closes #1041